package com.ggg.gkd.servicev1.impl;

import com.ggg.gkd.domain.entity.TestEntity;
import com.ggg.gkd.servicev1.TestService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class TestServiceImpl implements TestService {

    @Resource
    private TestEntity user;

    @Override
    public int getId(){
        return user.getId();
    }

    @Override
    public String getName() {
        return user.getName();
    }

    @Override
    public String getSex() {
        return user.getSex();
    }

    @Override
    public int getAge() {
        return user.getAge();
    }


    public void setUserId(int id){
        user.setId(100 * id);
    }

    public void setUserAttribute(String name, String sex, int age){
        user.setName(name);
        user.setSex(sex);
        user.setAge(age);
    }
}
